1. Field of the Invention
The present invention relates to a method for reducing the number of read and write operations performed on a recording disk during Mt. Rainier defect processing.
2. Description of the Prior Art
Mt. Rainier is an industry standard, proposed by Microsoft, Compaq, Philips, Sony and others, that regulates the data storage format of new recording disks. Hereafter the new recording disks are called CD-MRW for short. First, it is well-known that a optical disk drive can only write complete packets. Each packet includes one link block, four “run-in” blocks (Rin), 32 user data blocks, and two “run-out” blocks (Rout). The link block indicates whether the laser in the optical disk drive (which is used for the writing operation) is on or off. Typically, the start and the end of each packet contain a half block, for a total of one block. The Rin blocks can be considered to be “waiting” blocks, to address the situation where the servo system is not completely ready even when the laser is turned on (i.e., starting the write operation). The Rout blocks are similar in function to the Rin blocks.
FIG. 3 illustrates how the storage space on a conventional recording disk is organized. Each data block DA is intended to store data (i.e., data is to be written to each data area), and each data block DA is followed by an adjacent spare block SA that is used to store the data intended for its adjacent data block DA if that data block DA contains a defect. If the adjacent spare block SA is full, the defective block data will be written to other spare blocks SA.
In addition, each CD-MRW has a main table area (MTA). Defect tables are contained in a maximum of eight packets in the main table area. FIG. 4 illustrates a typical layout of a defect table block (DTB). The “Reallocation Entries” identify a defective block to which a replacement block has been assigned. The “Free Entries” identify a replacement block that has not yet been assigned to a defective block. The “Unusable Entries” identify a replacement block that cannot be used (e.g., the replacement block itself is defective). When a recording disk is formatted, defect table entries are recorded on to the disk. Each defect table entry consists of six bytes. The first three bytes indicate a defective block and the last three bytes indicate the corresponding replacement block that has been assigned for the defective block.
FIG. 1 is a flow chart illustrating a conventional Mt. Rainier method of writing data to a recording disk which has defects. Before the write operation begins, the defect tables on the disk are checked. When writing data to a defective block, the optical disk drive will write to the replacement block instead based on the physical block numbers contained in the defect tables.
In Step 10a, the write operation begins. In Step 11a, a write command is issued by the host; that is, the host issues the write command to the CD-RW unit, directing the optical disk drive to receive data that comes from the host and to write the received data to the recording disk.
In Step 12a, it is determined whether all the data from the host has been written. If all the data has been written, processing then proceeds to Step 13a where the write operation concludes. If all the data has not been completely written, then processing proceeds to Step 14a. 
In Step 14a, it is determined whether any defects are detected in a given section where data is to be written. If there is a defect in this section, then read, modify and write operations are performed for each of the defects. In other words, for the first defect, the block that is to be replaced is searched for in Step 141a, and then in Step 142a the entire packet where the replacement block is located is read from the recording disk into the replacement packet buffer (RPB), which is in the RAM of the optical disk drive. The RPB usually has a size of one packet. Next, in Step 143a, the data in the defective block is copied from the main buffer (which is also in the RAM of the optical disk drive) into the corresponding replacement block in the RPB. Then, in Step 144a, the modified data in the RPB is written to the corresponding spare block SA in the recording disk, after which processing proceeds to Step 15a. 
In Step 15a, it is determined whether there are more defects in the section where data is to be written. If there are other defects, then processing returns to Step 141a and the read, modify and write operations are repeated in Steps 141a–144a, until all the defects for the section have been processed. If there are no other defects in the section, processing then returns to Step 12a. 
Returning to Step 14a, if there are no defects in the section where data is to be written into, processing then proceeds to Step 145a where the contents of the main buffer are written directly to the recording disk. Processing then proceeds to Step 16a. 
In Step 16a, it is again determined whether there are new defects detected during the write operation. In this step, if no new defects are detected, processing then returns to Step 12a. However, new defects may occur on a recording disk even after it has been formatted (such as from scratches during use by the user). If any such new defects are detected, then processing proceeds to steps 161a–165a where free replacement blocks are searched for in the defect table for use as new replacement blocks. Here, “free replacement blocks” mean those blocks that have not been written into, and which are available to receive data.
At this point, the writing operation is terminated in step 161a so that free replacement blocks can be searched for. Then, in step 162a, free defect table entries (i.e., free replacement blocks) are searched for use as replacement data. After the search of the defect table is completed, processing proceeds to Step 163a. 
In step 163a, the entire packet where the replacement block is located is read from the RAM of the optical disk drive into the replacement packet buffer (RPB), which is in the RAM of the optical disk drive. Next, in Step 164a, the data of the defective block is copied from the main buffer into the corresponding replacement block in the RPB. Then, in Step 165a, the modified data in the RPB is written to the corresponding spare block SA in the recording disk, after which processing proceeds to Step 17a. 
In Step 17a, it is determined whether there are more defects. If new defects are detected, processing then returns to Step 162a and the read, modify and write operations are repeated in Steps 162a–165a, until processing of all the defects has been completed. If no new defects are detected, processing then returns directly to Step 12a. Thus, the read, modify and write operations in Steps 142a–144a are similar to those in Steps 163a–165a. 
As can be seen from the above, in this conventional method, replacement packets are read from the recording disk, the defective block data are copied, and then all the packet data are written to the recording disk. Thus, regardless of whether the defect encountered by the optical disk drive already exists in the defect table block (DTB) or is a new defect detected during the process of writing to the recording disk, the optical disk drive must still perform the read-modify-write operation for each and every defect. As a result, if N defects are detected in the recording disk, then the optical disk drive must perform N read and N write operations, resulting in a low efficiency in the buffer control. This will also seriously affect the read and write speed of the optical disk drive.